﻿using System;
using NLua;

namespace Ensemble_Windows.Script
{
    /// <summary>
    ///     Lua帮助类
    /// </summary>
    public class LuaHelper
    {
        /// <summary>
        ///     加载Lua文件
        /// </summary>
        /// <param name="lua">lua类</param>
        /// <param name="type">类型</param>
        /// <param name="path">文件</param>
        public static object[] LoadScript(string path, Lua lua, object type)
        {
            if (type == null) throw new ArgumentNullException("type");
            var result = lua.DoFile(path);
            return result;
        }
    }
}